package com.server.Example;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * The type Movies to type example.
 */
public class MoviesToTypeExample {
    /**
     * The Order by clause.
     */
    protected String orderByClause;

    /**
     * The Distinct.
     */
    protected boolean distinct;

    /**
     * The Ored criteria.
     */
    protected List<Criteria> oredCriteria;

    /**
     * Instantiates a new Movies to type example.
     */
    public MoviesToTypeExample() {
        oredCriteria = new ArrayList<>();
    }

    /**
     * Sets order by clause.
     *
     * @param orderByClause the order by clause
     */
    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    /**
     * Gets order by clause.
     *
     * @return the order by clause
     */
    public String getOrderByClause() {
        return orderByClause;
    }

    /**
     * Sets distinct.
     *
     * @param distinct the distinct
     */
    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    /**
     * Is distinct boolean.
     *
     * @return the boolean
     */
    public boolean isDistinct() {
        return distinct;
    }

    /**
     * Gets ored criteria.
     *
     * @return the ored criteria
     */
    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    /**
     * Or.
     *
     * @param criteria the criteria
     */
    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    /**
     * Or criteria.
     *
     * @return the criteria
     */
    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    /**
     * Create criteria criteria.
     *
     * @return the criteria
     */
    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    /**
     * Create criteria internal criteria.
     *
     * @return the criteria
     */
    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    /**
     * Clear.
     */
    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    /**
     * The type Generated criteria.
     */
    protected abstract static class GeneratedCriteria {
        /**
         * The Criteria.
         */
        protected List<Criterion> criteria;

        /**
         * Instantiates a new Generated criteria.
         */
        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        /**
         * Is valid boolean.
         *
         * @return the boolean
         */
        public boolean isValid() {
            return criteria.size() > 0;
        }

        /**
         * Gets all criteria.
         *
         * @return the all criteria
         */
        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        /**
         * Gets criteria.
         *
         * @return the criteria
         */
        public List<Criterion> getCriteria() {
            return criteria;
        }

        /**
         * Add criterion.
         *
         * @param condition the condition
         */
        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        /**
         * Add criterion.
         *
         * @param condition the condition
         * @param value     the value
         * @param property  the property
         */
        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        /**
         * Add criterion.
         *
         * @param condition the condition
         * @param value1    the value 1
         * @param value2    the value 2
         * @param property  the property
         */
        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        /**
         * And movies to type id is null criteria.
         *
         * @return the criteria
         */
        public Criteria andMoviesToTypeIdIsNull() {
            addCriterion("Movies_To_Type_id is null");
            return (Criteria) this;
        }

        /**
         * And movies to type id is not null criteria.
         *
         * @return the criteria
         */
        public Criteria andMoviesToTypeIdIsNotNull() {
            addCriterion("Movies_To_Type_id is not null");
            return (Criteria) this;
        }

        /**
         * And movies to type id equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesToTypeIdEqualTo(Integer value) {
            addCriterion("Movies_To_Type_id =", value, "moviesToTypeId");
            return (Criteria) this;
        }

        /**
         * And movies to type id not equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesToTypeIdNotEqualTo(Integer value) {
            addCriterion("Movies_To_Type_id <>", value, "moviesToTypeId");
            return (Criteria) this;
        }

        /**
         * And movies to type id greater than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesToTypeIdGreaterThan(Integer value) {
            addCriterion("Movies_To_Type_id >", value, "moviesToTypeId");
            return (Criteria) this;
        }

        /**
         * And movies to type id greater than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesToTypeIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("Movies_To_Type_id >=", value, "moviesToTypeId");
            return (Criteria) this;
        }

        /**
         * And movies to type id less than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesToTypeIdLessThan(Integer value) {
            addCriterion("Movies_To_Type_id <", value, "moviesToTypeId");
            return (Criteria) this;
        }

        /**
         * And movies to type id less than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesToTypeIdLessThanOrEqualTo(Integer value) {
            addCriterion("Movies_To_Type_id <=", value, "moviesToTypeId");
            return (Criteria) this;
        }

        /**
         * And movies to type id in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andMoviesToTypeIdIn(List<Integer> values) {
            addCriterion("Movies_To_Type_id in", values, "moviesToTypeId");
            return (Criteria) this;
        }

        /**
         * And movies to type id not in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andMoviesToTypeIdNotIn(List<Integer> values) {
            addCriterion("Movies_To_Type_id not in", values, "moviesToTypeId");
            return (Criteria) this;
        }

        /**
         * And movies to type id between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andMoviesToTypeIdBetween(Integer value1, Integer value2) {
            addCriterion("Movies_To_Type_id between", value1, value2, "moviesToTypeId");
            return (Criteria) this;
        }

        /**
         * And movies to type id not between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andMoviesToTypeIdNotBetween(Integer value1, Integer value2) {
            addCriterion("Movies_To_Type_id not between", value1, value2, "moviesToTypeId");
            return (Criteria) this;
        }

        /**
         * And movies info is null criteria.
         *
         * @return the criteria
         */
        public Criteria andMoviesInfoIsNull() {
            addCriterion("Movies_info is null");
            return (Criteria) this;
        }

        /**
         * And movies info is not null criteria.
         *
         * @return the criteria
         */
        public Criteria andMoviesInfoIsNotNull() {
            addCriterion("Movies_info is not null");
            return (Criteria) this;
        }

        /**
         * And movies info equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesInfoEqualTo(Integer value) {
            addCriterion("Movies_info =", value, "moviesInfo");
            return (Criteria) this;
        }

        /**
         * And movies info not equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesInfoNotEqualTo(Integer value) {
            addCriterion("Movies_info <>", value, "moviesInfo");
            return (Criteria) this;
        }

        /**
         * And movies info greater than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesInfoGreaterThan(Integer value) {
            addCriterion("Movies_info >", value, "moviesInfo");
            return (Criteria) this;
        }

        /**
         * And movies info greater than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesInfoGreaterThanOrEqualTo(Integer value) {
            addCriterion("Movies_info >=", value, "moviesInfo");
            return (Criteria) this;
        }

        /**
         * And movies info less than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesInfoLessThan(Integer value) {
            addCriterion("Movies_info <", value, "moviesInfo");
            return (Criteria) this;
        }

        /**
         * And movies info less than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesInfoLessThanOrEqualTo(Integer value) {
            addCriterion("Movies_info <=", value, "moviesInfo");
            return (Criteria) this;
        }

        /**
         * And movies info in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andMoviesInfoIn(List<Integer> values) {
            addCriterion("Movies_info in", values, "moviesInfo");
            return (Criteria) this;
        }

        /**
         * And movies info not in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andMoviesInfoNotIn(List<Integer> values) {
            addCriterion("Movies_info not in", values, "moviesInfo");
            return (Criteria) this;
        }

        /**
         * And movies info between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andMoviesInfoBetween(Integer value1, Integer value2) {
            addCriterion("Movies_info between", value1, value2, "moviesInfo");
            return (Criteria) this;
        }

        /**
         * And movies info not between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andMoviesInfoNotBetween(Integer value1, Integer value2) {
            addCriterion("Movies_info not between", value1, value2, "moviesInfo");
            return (Criteria) this;
        }

        /**
         * And movies type info is null criteria.
         *
         * @return the criteria
         */
        public Criteria andMoviesTypeInfoIsNull() {
            addCriterion("Movies_Type_info is null");
            return (Criteria) this;
        }

        /**
         * And movies type info is not null criteria.
         *
         * @return the criteria
         */
        public Criteria andMoviesTypeInfoIsNotNull() {
            addCriterion("Movies_Type_info is not null");
            return (Criteria) this;
        }

        /**
         * And movies type info equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeInfoEqualTo(Integer value) {
            addCriterion("Movies_Type_info =", value, "moviesTypeInfo");
            return (Criteria) this;
        }

        /**
         * And movies type info not equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeInfoNotEqualTo(Integer value) {
            addCriterion("Movies_Type_info <>", value, "moviesTypeInfo");
            return (Criteria) this;
        }

        /**
         * And movies type info greater than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeInfoGreaterThan(Integer value) {
            addCriterion("Movies_Type_info >", value, "moviesTypeInfo");
            return (Criteria) this;
        }

        /**
         * And movies type info greater than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeInfoGreaterThanOrEqualTo(Integer value) {
            addCriterion("Movies_Type_info >=", value, "moviesTypeInfo");
            return (Criteria) this;
        }

        /**
         * And movies type info less than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeInfoLessThan(Integer value) {
            addCriterion("Movies_Type_info <", value, "moviesTypeInfo");
            return (Criteria) this;
        }

        /**
         * And movies type info less than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeInfoLessThanOrEqualTo(Integer value) {
            addCriterion("Movies_Type_info <=", value, "moviesTypeInfo");
            return (Criteria) this;
        }

        /**
         * And movies type info in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andMoviesTypeInfoIn(List<Integer> values) {
            addCriterion("Movies_Type_info in", values, "moviesTypeInfo");
            return (Criteria) this;
        }

        /**
         * And movies type info not in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andMoviesTypeInfoNotIn(List<Integer> values) {
            addCriterion("Movies_Type_info not in", values, "moviesTypeInfo");
            return (Criteria) this;
        }

        /**
         * And movies type info between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andMoviesTypeInfoBetween(Integer value1, Integer value2) {
            addCriterion("Movies_Type_info between", value1, value2, "moviesTypeInfo");
            return (Criteria) this;
        }

        /**
         * And movies type info not between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andMoviesTypeInfoNotBetween(Integer value1, Integer value2) {
            addCriterion("Movies_Type_info not between", value1, value2, "moviesTypeInfo");
            return (Criteria) this;
        }

        /**
         * And movies type create is null criteria.
         *
         * @return the criteria
         */
        public Criteria andMoviesTypeCreateIsNull() {
            addCriterion("Movies_Type_create is null");
            return (Criteria) this;
        }

        /**
         * And movies type create is not null criteria.
         *
         * @return the criteria
         */
        public Criteria andMoviesTypeCreateIsNotNull() {
            addCriterion("Movies_Type_create is not null");
            return (Criteria) this;
        }

        /**
         * And movies type create equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeCreateEqualTo(Date value) {
            addCriterion("Movies_Type_create =", value, "moviesTypeCreate");
            return (Criteria) this;
        }

        /**
         * And movies type create not equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeCreateNotEqualTo(Date value) {
            addCriterion("Movies_Type_create <>", value, "moviesTypeCreate");
            return (Criteria) this;
        }

        /**
         * And movies type create greater than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeCreateGreaterThan(Date value) {
            addCriterion("Movies_Type_create >", value, "moviesTypeCreate");
            return (Criteria) this;
        }

        /**
         * And movies type create greater than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeCreateGreaterThanOrEqualTo(Date value) {
            addCriterion("Movies_Type_create >=", value, "moviesTypeCreate");
            return (Criteria) this;
        }

        /**
         * And movies type create less than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeCreateLessThan(Date value) {
            addCriterion("Movies_Type_create <", value, "moviesTypeCreate");
            return (Criteria) this;
        }

        /**
         * And movies type create less than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeCreateLessThanOrEqualTo(Date value) {
            addCriterion("Movies_Type_create <=", value, "moviesTypeCreate");
            return (Criteria) this;
        }

        /**
         * And movies type create in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andMoviesTypeCreateIn(List<Date> values) {
            addCriterion("Movies_Type_create in", values, "moviesTypeCreate");
            return (Criteria) this;
        }

        /**
         * And movies type create not in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andMoviesTypeCreateNotIn(List<Date> values) {
            addCriterion("Movies_Type_create not in", values, "moviesTypeCreate");
            return (Criteria) this;
        }

        /**
         * And movies type create between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andMoviesTypeCreateBetween(Date value1, Date value2) {
            addCriterion("Movies_Type_create between", value1, value2, "moviesTypeCreate");
            return (Criteria) this;
        }

        /**
         * And movies type create not between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andMoviesTypeCreateNotBetween(Date value1, Date value2) {
            addCriterion("Movies_Type_create not between", value1, value2, "moviesTypeCreate");
            return (Criteria) this;
        }

        /**
         * And movies to show is null criteria.
         *
         * @return the criteria
         */
        public Criteria andMoviesToShowIsNull() {
            addCriterion("Movies_To_Show is null");
            return (Criteria) this;
        }

        /**
         * And movies to show is not null criteria.
         *
         * @return the criteria
         */
        public Criteria andMoviesToShowIsNotNull() {
            addCriterion("Movies_To_Show is not null");
            return (Criteria) this;
        }

        /**
         * And movies to show equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesToShowEqualTo(Boolean value) {
            addCriterion("Movies_To_Show =", value, "moviesToShow");
            return (Criteria) this;
        }

        /**
         * And movies to show not equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesToShowNotEqualTo(Boolean value) {
            addCriterion("Movies_To_Show <>", value, "moviesToShow");
            return (Criteria) this;
        }

        /**
         * And movies to show greater than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesToShowGreaterThan(Boolean value) {
            addCriterion("Movies_To_Show >", value, "moviesToShow");
            return (Criteria) this;
        }

        /**
         * And movies to show greater than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesToShowGreaterThanOrEqualTo(Boolean value) {
            addCriterion("Movies_To_Show >=", value, "moviesToShow");
            return (Criteria) this;
        }

        /**
         * And movies to show less than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesToShowLessThan(Boolean value) {
            addCriterion("Movies_To_Show <", value, "moviesToShow");
            return (Criteria) this;
        }

        /**
         * And movies to show less than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesToShowLessThanOrEqualTo(Boolean value) {
            addCriterion("Movies_To_Show <=", value, "moviesToShow");
            return (Criteria) this;
        }

        /**
         * And movies to show in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andMoviesToShowIn(List<Boolean> values) {
            addCriterion("Movies_To_Show in", values, "moviesToShow");
            return (Criteria) this;
        }

        /**
         * And movies to show not in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andMoviesToShowNotIn(List<Boolean> values) {
            addCriterion("Movies_To_Show not in", values, "moviesToShow");
            return (Criteria) this;
        }

        /**
         * And movies to show between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andMoviesToShowBetween(Boolean value1, Boolean value2) {
            addCriterion("Movies_To_Show between", value1, value2, "moviesToShow");
            return (Criteria) this;
        }

        /**
         * And movies to show not between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andMoviesToShowNotBetween(Boolean value1, Boolean value2) {
            addCriterion("Movies_To_Show not between", value1, value2, "moviesToShow");
            return (Criteria) this;
        }
    }

    /**
     * The type Criteria.
     */
    public static class Criteria extends GeneratedCriteria {
        /**
         * Instantiates a new Criteria.
         */
        protected Criteria() {
            super();
        }
    }

    /**
     * The type Criterion.
     */
    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        /**
         * Gets condition.
         *
         * @return the condition
         */
        public String getCondition() {
            return condition;
        }

        /**
         * Gets value.
         *
         * @return the value
         */
        public Object getValue() {
            return value;
        }

        /**
         * Gets second value.
         *
         * @return the second value
         */
        public Object getSecondValue() {
            return secondValue;
        }

        /**
         * Is no value boolean.
         *
         * @return the boolean
         */
        public boolean isNoValue() {
            return noValue;
        }

        /**
         * Is single value boolean.
         *
         * @return the boolean
         */
        public boolean isSingleValue() {
            return singleValue;
        }

        /**
         * Is between value boolean.
         *
         * @return the boolean
         */
        public boolean isBetweenValue() {
            return betweenValue;
        }

        /**
         * Is list value boolean.
         *
         * @return the boolean
         */
        public boolean isListValue() {
            return listValue;
        }

        /**
         * Gets type handler.
         *
         * @return the type handler
         */
        public String getTypeHandler() {
            return typeHandler;
        }

        /**
         * Instantiates a new Criterion.
         *
         * @param condition the condition
         */
        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        /**
         * Instantiates a new Criterion.
         *
         * @param condition   the condition
         * @param value       the value
         * @param typeHandler the type handler
         */
        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        /**
         * Instantiates a new Criterion.
         *
         * @param condition the condition
         * @param value     the value
         */
        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        /**
         * Instantiates a new Criterion.
         *
         * @param condition   the condition
         * @param value       the value
         * @param secondValue the second value
         * @param typeHandler the type handler
         */
        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        /**
         * Instantiates a new Criterion.
         *
         * @param condition   the condition
         * @param value       the value
         * @param secondValue the second value
         */
        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}